#ifndef _SEQLIST_H_
#define _SEQLIST_H_

#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
//change this to use youself,there is int type
typedef int Elemtype;   

// define a struct to describe the seqlist
typedef struct
{
	Elemtype* elem;			// data point
	int capacity;			// seqlist max size
	int curr_size;			// seqlist current size
}Seqlist;

void SeqList_Init(Seqlist* seqlist, int capacity); 
int  Insert_Seqlist_At_Header(Seqlist* seqlist, Elemtype elem);
int  Insert_Seqlist_At_End(Seqlist* seqlist, Elemtype elem);
int  Insert_Seqlist_Special(Seqlist* seqlist,int location,Elemtype elem);

int  Erase_seqlist_Special(Seqlist* seqlist, int location);
int  Erase_seqlist_Elem(Seqlist* seqlist, Elemtype elem);

int  Change_Seqlist_ByID(Seqlist* seqlist, int location, Elemtype elem);
int  Change_Seqlist_ByElem(Seqlist* seqlist, Elemtype source, Elemtype elem);

int  Find_seqlist_Elem(Seqlist* seqlist, Elemtype elem);
Elemtype * Find_seqlist_ByID(Seqlist* seqlist, int location);

void Foreach_Seqlist(Seqlist* seqlist);
#endif // !_SEQLIST_H_

